Skip to content

Conversation

@joshea0
Copy link

@joshea0 joshea0 commented Mar 1, 2022

Summary

First of all, thank you for publishing this fantastic package! It has worked great for our use case so far.

This PR adds support for customizing the zIndex property of the toasts so that they can be displayed on top of other components.

Motivation

The motivation for this is that our project uses react-native-reanimated-bottom-sheet and we want the ability to display toasts on top of the bottom sheet when it is open. When I tested this, it did not work. However, adding the zIndex property allowed it to work. I would guess there are other scenarios where it would be useful to customize zIndex as well.

This PR keeps zIndex as optional with a default of 1. That way anyone who doesn't need it can ignore it, and anyone who needs the customization has the option.

Testing

I tested this locally in our project and it works as intended. Unfortunately, I am unable to get the project tests to run locally with yarn test (even on the develop branch with no changes). If you know how I can fix that, please let me know. I'd be happy to run tests locally to make sure this doesn't break anything.

If there is anything I can do to improve this PR to ensure it gets merged, please let me know. Thanks again for your work on this package.

joshea0 added a commit to fig-foodisgood/react-native-styled-toast that referenced this pull request Mar 1, 2022
…ing a fork

We are blocked on fixing an issue in this package. We have opened a PR here:
jeanverster#88

However, we need to use this fix from our fork in the meantime. If that PR
gets merged to the main package we will switch back.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant